import request from '/@/utils/request';

class Login {
	static async signIn(params: object) {
		const res = await request({
			url: '/user/signIn',
			method: 'post',
			data: params,
		});
		return res;
	}

	static async signOut(params?: object) {
		return await request({
			url: '/user/signOut',
			method: 'post',
			data: params,
		});
	}

	static async getCodeImg() {
		const res = await request({
			url: '/captchaImage',
			method: 'get',
			timeout: 20000
		});
		return res;
	}
}

export default Login;
